home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / nonport / shadows.c < prev    next >
C/C++ Source or Header  |  1993-08-13  |  1KB  |  63 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifndef    NDEBUG
  5. char *rcsid_shadows = "$Header: k:/tools/src/curses/nonport/rcs/shadows.c 2.1.0.2 93/08/13 08:41:05 frotz Beta2 $";
  6. #endif
  7.  
  8. /*man-start*********************************************************************
  9.  
  10.   shadows()    - Specify light source for window shadows
  11.  
  12.   PDCurses Description:
  13.      Specifies the default light source direction for shadows on all windows.
  14.      The light source is opposite of the shadow being cast.
  15.  
  16.      Light Source Directions:
  17.      ------------------------
  18.  
  19.              NORTH
  20.          NORTH_WEST      1    NORTH_EAST
  21.                8   |   2
  22.                 \  |  /
  23.              \ | /
  24.             WEST 7 ---\./---3 EAST
  25.               /|\
  26.              / | \
  27.                 6  |  4
  28.           SOUTH_WEST   5   SOUTH_EAST
  29.              SOUTH
  30.  
  31.      If there is no shadowing, specify a light source of 0.
  32.     This routine is implemented as a macro.
  33.  
  34.   PDCurses Return Value:
  35.      The shadows() function returns the specified direction.
  36.  
  37.   PDCurses Errors:
  38.      No errors are defined for this function.
  39.  
  40.   Portability:
  41.      PDCurses    int shadows( int light_src_dir, chtype chattr );
  42.      BSD Curses
  43.      SYS V Curses
  44.  
  45. **man-end**********************************************************************/
  46.  
  47. int    shadows( int light_src_dir, chtype chattr )
  48. {
  49. #ifdef PDCDEBUG
  50.     if (trace_on) PDC_debug("shadow() - called\n");
  51. #endif
  52.  
  53.     if (stdscr == (WINDOW *)NULL)
  54.         return( ERR );
  55.  
  56.     _cursvar.shadows    = light_src_dir;
  57.     _cursvar.shadow_char    = chattr;
  58.     return( OK );
  59. }
  60.  
  61.  
  62.  
  63.